<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-weixinSetting-edit" th:object="${weixinSetting}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">键：</label>
                <div class="col-sm-8">
                    <input id="weixinKey" name="weixinKey" th:field="*{weixinKey}" readonly="readonly" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">值：</label>
                <div class="col-sm-8">
                    <input id="weixinValue" name="weixinValue" th:field="*{weixinValue}" class="form-control" type="text">
                </div>
            </div> 
           <div class="form-group">	
				<label class="col-sm-3 control-label">应用类型：</label>
				<div class="col-sm-8">
					<select id="appType" name="appType" class="form-control m-b" th:with="type=${@dict.getType('weixin_app_type')}">
	                    <option th:each="dicts : ${type}" th:text="${dicts['dictLabel']}" th:value="${dicts['dictValue']}" th:field="*{appType}"></option>
	                </select>
				</div>
			</div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "weixin/weixinSetting"
		$("#form-weixinSetting-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/save", $('#form-weixinSetting-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
